\(\int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx\) [529]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 133 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3 \csc (c+d x)}{d}+\frac {5 a^3 \csc ^2(c+d x)}{2 d}+\frac {5 a^3 \csc ^3(c+d x)}{3 d}-\frac {a^3 \csc ^4(c+d x)}{4 d}-\frac {3 a^3 \csc ^5(c+d x)}{5 d}-\frac {a^3 \csc ^6(c+d x)}{6 d}+\frac {3 a^3 \log (\sin (c+d x))}{d}+\frac {a^3 \sin (c+d x)}{d} \]

[Out]

-a^3*csc(d*x+c)/d+5/2*a^3*csc(d*x+c)^2/d+5/3*a^3*csc(d*x+c)^3/d-1/4*a^3*csc(d*x+c)^4/d-3/5*a^3*csc(d*x+c)^5/d-
1/6*a^3*csc(d*x+c)^6/d+3*a^3*ln(sin(d*x+c))/d+a^3*sin(d*x+c)/d

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2915, 12, 90} \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {a^3 \sin (c+d x)}{d}-\frac {a^3 \csc ^6(c+d x)}{6 d}-\frac {3 a^3 \csc ^5(c+d x)}{5 d}-\frac {a^3 \csc ^4(c+d x)}{4 d}+\frac {5 a^3 \csc ^3(c+d x)}{3 d}+\frac {5 a^3 \csc ^2(c+d x)}{2 d}-\frac {a^3 \csc (c+d x)}{d}+\frac {3 a^3 \log (\sin (c+d x))}{d} \]

[In]

Int[Cot[c + d*x]^5*Csc[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]

[Out]

-((a^3*Csc[c + d*x])/d) + (5*a^3*Csc[c + d*x]^2)/(2*d) + (5*a^3*Csc[c + d*x]^3)/(3*d) - (a^3*Csc[c + d*x]^4)/(
4*d) - (3*a^3*Csc[c + d*x]^5)/(5*d) - (a^3*Csc[c + d*x]^6)/(6*d) + (3*a^3*Log[Sin[c + d*x]])/d + (a^3*Sin[c +
d*x])/d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a^7 (a-x)^2 (a+x)^5}{x^7} \, dx,x,a \sin (c+d x)\right )}{a^5 d} \\ & = \frac {a^2 \text {Subst}\left (\int \frac {(a-x)^2 (a+x)^5}{x^7} \, dx,x,a \sin (c+d x)\right )}{d} \\ & = \frac {a^2 \text {Subst}\left (\int \left (1+\frac {a^7}{x^7}+\frac {3 a^6}{x^6}+\frac {a^5}{x^5}-\frac {5 a^4}{x^4}-\frac {5 a^3}{x^3}+\frac {a^2}{x^2}+\frac {3 a}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d} \\ & = -\frac {a^3 \csc (c+d x)}{d}+\frac {5 a^3 \csc ^2(c+d x)}{2 d}+\frac {5 a^3 \csc ^3(c+d x)}{3 d}-\frac {a^3 \csc ^4(c+d x)}{4 d}-\frac {3 a^3 \csc ^5(c+d x)}{5 d}-\frac {a^3 \csc ^6(c+d x)}{6 d}+\frac {3 a^3 \log (\sin (c+d x))}{d}+\frac {a^3 \sin (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=a^3 \left (-\frac {\csc (c+d x)}{d}+\frac {5 \csc ^2(c+d x)}{2 d}+\frac {5 \csc ^3(c+d x)}{3 d}-\frac {\csc ^4(c+d x)}{4 d}-\frac {3 \csc ^5(c+d x)}{5 d}-\frac {\csc ^6(c+d x)}{6 d}+\frac {3 \log (\sin (c+d x))}{d}+\frac {\sin (c+d x)}{d}\right ) \]

[In]

Integrate[Cot[c + d*x]^5*Csc[c + d*x]^2*(a + a*Sin[c + d*x])^3,x]

[Out]

a^3*(-(Csc[c + d*x]/d) + (5*Csc[c + d*x]^2)/(2*d) + (5*Csc[c + d*x]^3)/(3*d) - Csc[c + d*x]^4/(4*d) - (3*Csc[c
 + d*x]^5)/(5*d) - Csc[c + d*x]^6/(6*d) + (3*Log[Sin[c + d*x]])/d + Sin[c + d*x]/d)

Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.64

method result size
derivativedivides \(-\frac {a^{3} \left (\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{6}+\frac {3 \left (\csc ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{4}-\frac {5 \left (\csc ^{3}\left (d x +c \right )\right )}{3}-\frac {5 \left (\csc ^{2}\left (d x +c \right )\right )}{2}+\csc \left (d x +c \right )+3 \ln \left (\csc \left (d x +c \right )\right )-\frac {1}{\csc \left (d x +c \right )}\right )}{d}\) \(85\)
default \(-\frac {a^{3} \left (\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{6}+\frac {3 \left (\csc ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{4}-\frac {5 \left (\csc ^{3}\left (d x +c \right )\right )}{3}-\frac {5 \left (\csc ^{2}\left (d x +c \right )\right )}{2}+\csc \left (d x +c \right )+3 \ln \left (\csc \left (d x +c \right )\right )-\frac {1}{\csc \left (d x +c \right )}\right )}{d}\) \(85\)
parallelrisch \(\frac {3 \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\csc ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\left (30 \cos \left (2 d x +2 c \right )-12 \cos \left (4 d x +4 c \right )+2 \cos \left (6 d x +6 c \right )-20\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-30 \cos \left (2 d x +2 c \right )+12 \cos \left (4 d x +4 c \right )-2 \cos \left (6 d x +6 c \right )+20\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin \left (5 d x +5 c \right )-\frac {\sin \left (7 d x +7 c \right )}{3}-\frac {1483 \cos \left (2 d x +2 c \right )}{192}+\frac {5 \cos \left (4 d x +4 c \right )}{32}+\frac {625 \cos \left (6 d x +6 c \right )}{576}+\frac {61 \sin \left (d x +c \right )}{5}-\frac {83 \sin \left (3 d x +3 c \right )}{9}+\frac {281}{96}\right ) a^{3}}{4096 d}\) \(199\)
risch \(-3 i a^{3} x -\frac {i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {6 i a^{3} c}{d}-\frac {2 i a^{3} \left (-75 i {\mathrm e}^{10 i \left (d x +c \right )}+15 \,{\mathrm e}^{11 i \left (d x +c \right )}+270 i {\mathrm e}^{8 i \left (d x +c \right )}+25 \,{\mathrm e}^{9 i \left (d x +c \right )}-310 i {\mathrm e}^{6 i \left (d x +c \right )}-6 \,{\mathrm e}^{7 i \left (d x +c \right )}+270 i {\mathrm e}^{4 i \left (d x +c \right )}+6 \,{\mathrm e}^{5 i \left (d x +c \right )}-75 i {\mathrm e}^{2 i \left (d x +c \right )}-25 \,{\mathrm e}^{3 i \left (d x +c \right )}-15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}+\frac {3 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(224\)

[In]

int(cos(d*x+c)^5*csc(d*x+c)^7*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

-a^3/d*(1/6*csc(d*x+c)^6+3/5*csc(d*x+c)^5+1/4*csc(d*x+c)^4-5/3*csc(d*x+c)^3-5/2*csc(d*x+c)^2+csc(d*x+c)+3*ln(c
sc(d*x+c))-1/csc(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.35 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {150 \, a^{3} \cos \left (d x + c\right )^{4} - 285 \, a^{3} \cos \left (d x + c\right )^{2} + 125 \, a^{3} - 180 \, {\left (a^{3} \cos \left (d x + c\right )^{6} - 3 \, a^{3} \cos \left (d x + c\right )^{4} + 3 \, a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 4 \, {\left (15 \, a^{3} \cos \left (d x + c\right )^{6} - 30 \, a^{3} \cos \left (d x + c\right )^{4} + 40 \, a^{3} \cos \left (d x + c\right )^{2} - 16 \, a^{3}\right )} \sin \left (d x + c\right )}{60 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^7*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/60*(150*a^3*cos(d*x + c)^4 - 285*a^3*cos(d*x + c)^2 + 125*a^3 - 180*(a^3*cos(d*x + c)^6 - 3*a^3*cos(d*x + c
)^4 + 3*a^3*cos(d*x + c)^2 - a^3)*log(1/2*sin(d*x + c)) - 4*(15*a^3*cos(d*x + c)^6 - 30*a^3*cos(d*x + c)^4 + 4
0*a^3*cos(d*x + c)^2 - 16*a^3)*sin(d*x + c))/(d*cos(d*x + c)^6 - 3*d*cos(d*x + c)^4 + 3*d*cos(d*x + c)^2 - d)

Sympy [F(-1)]

Timed out. \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*csc(d*x+c)**7*(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.81 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {180 \, a^{3} \log \left (\sin \left (d x + c\right )\right ) + 60 \, a^{3} \sin \left (d x + c\right ) - \frac {60 \, a^{3} \sin \left (d x + c\right )^{5} - 150 \, a^{3} \sin \left (d x + c\right )^{4} - 100 \, a^{3} \sin \left (d x + c\right )^{3} + 15 \, a^{3} \sin \left (d x + c\right )^{2} + 36 \, a^{3} \sin \left (d x + c\right ) + 10 \, a^{3}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^7*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/60*(180*a^3*log(sin(d*x + c)) + 60*a^3*sin(d*x + c) - (60*a^3*sin(d*x + c)^5 - 150*a^3*sin(d*x + c)^4 - 100*
a^3*sin(d*x + c)^3 + 15*a^3*sin(d*x + c)^2 + 36*a^3*sin(d*x + c) + 10*a^3)/sin(d*x + c)^6)/d

Giac [A] (verification not implemented)

none

Time = 0.47 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.92 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {180 \, a^{3} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 60 \, a^{3} \sin \left (d x + c\right ) - \frac {441 \, a^{3} \sin \left (d x + c\right )^{6} + 60 \, a^{3} \sin \left (d x + c\right )^{5} - 150 \, a^{3} \sin \left (d x + c\right )^{4} - 100 \, a^{3} \sin \left (d x + c\right )^{3} + 15 \, a^{3} \sin \left (d x + c\right )^{2} + 36 \, a^{3} \sin \left (d x + c\right ) + 10 \, a^{3}}{\sin \left (d x + c\right )^{6}}}{60 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)^7*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/60*(180*a^3*log(abs(sin(d*x + c))) + 60*a^3*sin(d*x + c) - (441*a^3*sin(d*x + c)^6 + 60*a^3*sin(d*x + c)^5 -
 150*a^3*sin(d*x + c)^4 - 100*a^3*sin(d*x + c)^3 + 15*a^3*sin(d*x + c)^2 + 36*a^3*sin(d*x + c) + 10*a^3)/sin(d
*x + c)^6)/d

Mupad [B] (verification not implemented)

Time = 11.03 (sec) , antiderivative size = 296, normalized size of antiderivative = 2.23 \[ \int \cot ^5(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {67\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}+\frac {11\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}-\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}+\frac {a^3\,\left (5760\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-5760\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\right )}{1920\,d}-\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {31\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{16}+\frac {67\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{128}+\frac {5\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{96}+\frac {63\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{128}+\frac {23\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{240}-\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{384}-\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{160}-\frac {a^3}{384}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

[In]

int((cos(c + d*x)^5*(a + a*sin(c + d*x))^3)/sin(c + d*x)^7,x)

[Out]

(67*a^3*tan(c/2 + (d*x)/2)^2)/(128*d) + (11*a^3*tan(c/2 + (d*x)/2)^3)/(96*d) - (a^3*tan(c/2 + (d*x)/2)^4)/(32*
d) - (3*a^3*tan(c/2 + (d*x)/2)^5)/(160*d) - (a^3*tan(c/2 + (d*x)/2)^6)/(384*d) + (a^3*(5760*log(tan(c/2 + (d*x
)/2)) - 5760*log(tan(c/2 + (d*x)/2)^2 + 1)))/(1920*d) - (a^3*tan(c/2 + (d*x)/2))/(16*d) + (cot(c/2 + (d*x)/2)^
6*((23*a^3*tan(c/2 + (d*x)/2)^3)/240 - (13*a^3*tan(c/2 + (d*x)/2)^2)/384 + (63*a^3*tan(c/2 + (d*x)/2)^4)/128 +
 (5*a^3*tan(c/2 + (d*x)/2)^5)/96 + (67*a^3*tan(c/2 + (d*x)/2)^6)/128 + (31*a^3*tan(c/2 + (d*x)/2)^7)/16 - a^3/
384 - (3*a^3*tan(c/2 + (d*x)/2))/160))/(d*(tan(c/2 + (d*x)/2)^2 + 1))